<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2020/11/12
 * Time: 17:49
 */

namespace app\api\service;


use app\adminapiv3\service\ServerAuth;

class Auth
{
    /**
     * @name 从线上拉取授权
     * @author wx
     * @date 2020/11/12 17:49
     */
    public function online()
    {
        //获取当前授权
        $key = db('server_auth')->value('auth_key');

        if(!$key){
            return 'no auth info';
        }

        //调用在线注册接口
        $authServer = new ServerAuth();
        $authServer->online($key);


        return 'success';
    }
}